package com.hqd.ch03.v26.spel.ast;

import com.hqd.ch03.v26.spel.standard.ExpressionState;

/**
 * int类型节点
 */
public class IntLiteral extends SpelNodeImpl {
    private Integer val;

    public IntLiteral(int startPos, int endPos, String strVal) {
        super(startPos, endPos);
        this.val = Integer.parseInt(strVal);
    }

    @Override
    public Object getValue(ExpressionState state) {
        return val;
    }
}
